<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <input type="text" / class="ipt1">

    <button>点我判断</button>
  </body>
</html>
<script>
  var oIpt1 = document.querySelector(".ipt1");

  var oBtn = document.querySelector("button");
  var str = "";
  oBtn.onclick = function () {
    for (var i = 10; i <= 99; i++) {
      var g = i % 10;
      var s = parseInt(i / 10);
      if (i % 7 == 0 || g == 7 || s == 7) {
        str += i + " ";
      }
      oIpt1.value = str;
    }
  };
</script>
